package mystring;

public class MyStringDemo {

    public static int parseStringToIng(String str){
        int sum = 0;
        char[] chars = str.toCharArray();
        for(int i=0; i<chars.length;  i++){
            sum *=10;
            sum += (chars[i]-'0');
        }
        return sum;
    }

    public static int stringAddInt(String str, int value){
        // 忽略参数检查
        int sum1 = parseStringToIng(str);
        System.out.println(sum1);
        int sum = sum1 + value;

        return sum;

    }
    public static void main(String[] args) {
        System.out.println(stringAddInt("445788", 1));
    }
}
